#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main() {
    char c = 'h';
    //putchar(c);
    //fputc(c, stdout);
    FILE* file = fopen("test.txt", "a+");
    if(file == NULL) {
        perror("Error");
        exit(1);
    }

    fputc(c, file);
    putchar('\n');
    fclose(file);
    return 0;
}